<template>
  <div>
    <a-table 
    :columns="columns" 
    :data-source="list"
    :pagination="{total:list.length,pageSize:3}">
    </a-table>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data(){
    return{
      columns:[
        {
          title:"店铺名称",
          dataIndex:"name",
          key:"name"
        },
        {
          title:"店铺地址",
          dataIndex:"address",
          key:"address"
        },
        {
          title:"店铺描述",
          dataIndex:"promotion_info",
          key:"promotion_info"
        },
        {
          title:"操作"
        }
      ],
      list:[]
    }
  },
  mounted(){
   axios.get("http://localhost:8080/shopList.json").then((res)=>{
      // console.log(res)
      this.list = res.data;
   })
  },
}
</script>
